home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 8
/
Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso
/
Aminet
/
comm
/
tcp
/
NNTPspool.lha
/
NNTPspool
< prev
next >
Wrap
Text File
|
1995-07-12
|
2KB
|
91 lines
/*
$VER: NNTPspool 1.0 (20.05.95) by Piergiorgio Ghezzo
This script allow you to maintain a news article spooler
with NNTPpost.
*/
OPTIONS FAILAT 50
SpoolFile = "AMITCP:NewsSpool/News." /* The spool filename without extension (full path) */
PostNews = "AMITCP:Bin/NNTPpost" /* The news article post program */
CopyCmd = "C:Copy >NIL:" /* The copy program */
DelCmd = "C:Delete >NIL:" /* The delete program */
parse arg FileName Mode .
if FileName = "?" then call usage
if FileName = ""
then call send
else call archive
EXIT 0
/*** Spedisce i files presenti nello spool ******************************/
Send:
Ciclo = 0
Uscita = 0 /*** Dopo cinque tentativi esce ***/
SAY "0A"x"
Spedisco i messaggi presenti nello spooler...
"
DO WHILE(Uscita < 5)
Final = SpoolFile || Ciclo
Ciclo = Ciclo + 1
IF EXISTS(Final)
THEN DO
Uscita = 0
ADDRESS COMMAND PostNews Final
IF RC ~= 0
THEN DO
SAY "0A"x"
Non posso spedire la posta!
"
EXIT 10
END
ADDRESS COMMAND DelCmd Final
END
ELSE Uscita = Uscita + 1
END
SAY "
Fatto!
"||"0A"x
RETURN
/*** Archivia il file da spedire nello spool ****************************/
Archive:
Ciclo = 0
Uscita = n
ADDRESS COMMAND PostNews FileName
IF RC ~= 0
THEN DO
DO WHILE(Uscita = n)
Final = SpoolFile || Ciclo
IF EXISTS(Final)
THEN Ciclo = Ciclo + 1
ELSE Uscita = y
END
ADDRESS COMMAND CopyCmd FileName Final
END
IF Mode ~= "NODELETE"
THEN ADDRESS COMMAND DelCmd FileName
RETURN
/*** Informazioni e aiuto ***********************************************/
Usage:
SAY "0A"x"
NNTPspool
v1.0 - by Piergiorgio Ghezzo"
SAY "
A spooler for your articles!
"
SAY "0A"x"
Usage:
NNTPspool <FileName> [NODELETE] - Queue the article."
SAY " If NODELETE isn't specified,"
SAY " delete the source file."||"0A"x
SAY " NNTPspool - Send the files in the spool"||"0A"x
EXIT 0